<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="description" content="山东电子口岸"/>
    <meta name="keywords" content="山东电子口岸"/>

    <%@include file="/WEB-INF/pages/common/taglib.jsp" %>
    <%@include file="/WEB-INF/pages/common/common.jsp" %>
    <link rel="stylesheet" href="${basePath}/resources/css/base.css"/>
    <link rel="stylesheet" href="${basePath}/resources/css/single.css"/>
    <!--[if lt IE 9]>
    <script src="${basePath}/singlewindows/js/html5.js"></script>
    <![endif]-->
    <title>山东电子口岸</title>
</head>
<script>
    function sendMail() {
        disableSend();
        $.post("${basePath}/reg/verifyMail?r" + Math.random(), {
            mail: $("#email").val(),
            mailKey: $("#mailKey").val()
        }, function (data) {
            if (data.indexOf("success") < 0) {
                layer.alert(data, {icon: 5})
            }
        });
    }

    function disableSend() {
        var i = 60;
        var sit = window.setInterval(function () {
            $("#submit").val("重新发送(" + (i--) + ")");
        }, 1000);
        window.setTimeout(function () {
            window.clearInterval(sit);
            $("#submit").val("重新发送");
            $("#submit").attr("disabled", false).css("background-color", "#30a1f2");
        }, 62000);
//        62000
        $("#submit").attr("disabled", true).css("background-color", "#3aa6f5");
    }
</script>
<body>
<!--头部 start-->
<div class="top">
    <div class="wrapper">
        <p class="welcome">您好，欢迎来到山东跨境电子商务单一窗口！</p>
        <div class="cl"></div>
    </div>
</div>
<header>
    <div class="wrapper">
        <a href="/"><h1>山东跨境电子商务单一窗口<span>SHANDONG Cross-Border E-Commerce SingleWindow</span></h1></a>
        <p class="tel">热线电话：<strong>400-676-0166</strong></p>
        <div class="cl"></div>
    </div>
</header>
<!--头部 end-->
<!--流程 start-->
<div class="flow">
    <ol class="wrapper">
        <li class="active"><i>1</i> 邮箱验证</li>
        <li><i>2</i> 填写用户信息</li>
        <li><i>3</i> 注册成功</li>
    </ol>
</div>
<!--流程 end-->
<div class="wrapper">
    <div class="flow1">
        <span class="email"></span>
        <p>邮箱注册邮件已发送到</p>
        <div class="letter">
            <p>${mail}</p>
        </div>
        <input type="hidden" id="email" value="${mail}"/>
        <input type="hidden" id="mailKey" value="${mailKey}"/>
        <p>请在24小时内点击邮箱中的邮箱注册链接，完成注册！</p>
        <div class="tie">
            <i class="alert"></i> 如未收到邮件！<span><input id="submit"  type="button" value="重新发送"
                                                      style="cursor: pointer;border: 0;"
                                                       onclick="sendMail();"/></span>
        </div>
    </div>
</div>
<footer>
    <div class="wrapper">
        <address>版权所有 山东电子口岸  Copyright© 2015 sdeport.gov,cn   All Rights Reserved<br />鲁ICP备14042570号-2<br />技术支持：山东汇贸电子口岸有限公司</address>
        <%--<img src="${basePath}/images/wechat.png" />--%>
        <div class="cl"></div>
    </div>
</footer>
</body>
<script>
    disableSend();
</script>
</html>
